<template>
  <div class="page-wrapper">
    <ul>
     <li v-for="(item,index) in pageData" :key="index">
      {{item.id}}: {{item.username}}: {{item.nickname}}
     </li>
    </ul>

   <el-pagination
      @size-change="handleSizeChange"
      @current-change="handleCurrentChange"
      :current-page="currentPage"
      :page-sizes="[5]"
      :page-size="size"
      layout="total, sizes, prev, pager, next, jumper"
      :total="total">
    </el-pagination>
  </div>
</template>

<script>
      // :page-sizes="[100, 200, 300, 400]"
export default {
  props: {
    pageData: {
      type: Array,
      // default: []
    },
    total: {
      type: Number,
    },
    size: {
      type: Number | String
    },
    currentPage: {
      type: Number,
      default: 1
    }
  },
  data() {
    return {}
  },
  methods: {
    handleSizeChange(size) {
      this.$emit('handleSizeChange', size)
    },
    handleCurrentChange(current) {
      this.$emit('handleCurrentChange', current)
    }
  },
}

</script>

<style >

</style>